package assignmentstrategy

import (
	"codejy/analysis/codeanalysis"
	"codejy/store"
	"codejy/structdef"
)

type TypeInstanceGlobalStrategy struct {
}

func init() {
	RegisterStrategy(&TypeInstanceGlobalStrategy{})
}
func (n TypeInstanceGlobalStrategy) getId() int {
	return codeanalysis.TypeInstanceGlobal
}

func (n TypeInstanceGlobalStrategy) Execute(threadStore *structdef.ThreadStore, code string) string {
	instance, _ := store.GetGlobalInstance(threadStore, code) //获取实例地址
	return instance
}
